﻿using System;

//用了toString统一，方便查询中展示
namespace Model
{
    public class School
    {
        public int SchoolID { get; set; }
        public string SchoolName { get; set; }
        public override string ToString()
        {
            return $"School:{SchoolName} ID:{SchoolID}";
        }
    }

    public class Class
    {
        public int ClassID { get; set; }
        public string ClassName { get; set; }
        public int SchoolID { get; set; }

        public override string ToString()
        {
            return $"Class:{ClassName} schoolID:{SchoolID} ID:{ClassID}";
        }
    }

    public class Student
    {
        public int StudentID { get; set; }
        public string StudentName { get; set; }
        public int Age { get; set; }
        public int ClassID { get; set; }
        public override string ToString()
        {
            return $"Student:{StudentName} Age: {Age} classID:{ClassID} ID:{StudentID}";
        }
    }
    public class Log
    {
        public int LogID { get; set; }
        public string ActionType { get; set; }
        public string EntityName { get; set; }
        public int EntityID { get; set; }
        public DateTime Timestamp { get; set; }
        public string Description { get; set; }
        public string displayInfo
        {
            get
            {
                return $"Time：{Timestamp} action:{ActionType} - {EntityName}";
            }
        }
    }
}
